
<%@ page import="com.macrosolution.exdebito.FileDocument" %>

<div class="modal fade" id="fileUpload_modal" tabindex="-1" role="dialog" aria-labelledby="wsw" aria-hidden="true" data-backdrop="static" data-keyboard="false">
	
	<div class="modal-dialog">
		
		<div class="modal-content">
			
			<div class="modal-header">
        		
        		<h4 class="modal-title" id="myModalLabel">Aggiungi un File</h4>
      		</div>
      		
      		<div class="modal-body">
      			
<%--      			<g:form  action="upload_an" class="form-orizzontal" role="form" enctype= "multipart/form-data" >--%>
      				<input type="hidden" id="piddi" name="piddi" value="${praticaInstance?.id }" class="btn btn-default" >
									
					<input name="file" type="file" class="btn btn-default" id="fileAnomal" required>
						<p class="help-block">
							Seleziona il file da inserire nella pratica
						</p>
						
						<g:select 
						class="form-control " 
						id="documentType" 
						name="documentType.id" 
						from="${com.macrosolution.exdebito.DocType.findAllByDocumentCategory(2)}" 
						optionKey="id" 
						required="" 
						value="${fileDocumentInstance?.documentType?.id}"
						optionValue="documentType" 
				/>
				<p class="help-block">
							Indica la cartella di destinazione	
						</p>
						
					<textarea name="comments" id ="comments" class="form-control" placeholder="Inserisci un commento al file" rows="3" maxlength="150"></textarea>
					<%--			progress--%>
			<div class="row">
				<div class="col col-md-12" id="progressBox" style="display:none">
					
					<div class="bar-holder">
						<div class="progress left">
							<div id="myprogress" class="progress-bar bg-color-green" role="progressbar" style="width: 0%" >43</div>
						</div>
					</div>
				
				</div>
			
			</div>
<%--			progress--%>
					

					
					<div class="modal-footer">
				        <button id ="upCloseBtn" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
				        <button type="button" id="btnUpload" onclick="uploadAj()" class="btn btn-primary" data-loading-text="Loading..." >Upload File</button>
				    </div>
			
<%--				</g:form>--%>
      				
      				
      		
      		</div>
		
		</div>
	
	</div>

</div>
